//
//  UIImage+Additions.h
//  YanWei
//
//  Created by 言味 on 16/5/4.
//  Copyright © 2016年 sfwen. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage (Additions)

/**无缓存加载图片*/
+ (UIImage *)imageWithNoCache:(NSString*)name;
/**旋转图片*/
+ (UIImage *)rotateImage:(UIImage *)aImage;

/**指定大小的图片*/
- (UIImage *)renderAtSize:(const CGSize) size;
- (UIImage *)maskWithImage:(const UIImage *)maskImage;

/**颜色图片*/
+ (UIImage *)imageWithColor:(UIColor *)color cornerRadius:(CGFloat)cornerRadius;

/**
 *  从图片中按指定的位置大小截取图片的一部分
 *
 *  @param image UIImage image 原始的图片
 *  @param rect  CGRect rect 要截取的区域
 *
 *  @return UIImage
 */
+ (UIImage *)ct_imageFromImage:(UIImage *)image inRect:(CGRect)rect;

+ (UIImage *)resizeWithImage:(UIImage *)image;

@end
